package com.jlcindia;

public class OOPTest36 {

	public static void main(String[] args) {
		Userservice serv=null;
		//serv=new Userservice();
		//serv.adduser("ravi","javasree");
		System.out.println(Userservice.data);
		Userservice.show();
		DBuserservice dserv=new DBuserservice();
		dserv.adduser("Mr","Ravi");
		dserv.search("JLCINDIA");

	}

}
abstract class Userservice{
	static int data=99;
	String uname;
	String name;
	Userservice(){
		System.out.println("**Userservice def cons**");
	}
	public Userservice(String uname, String name) {
		this.uname = uname;
		this.name = name;
		System.out.println("**Userservice  cons**");
	}
	{
		System.out.println("**Instance block of Userservice **");
	}
	static void show(){
		System.out.println("**show() static method**");
	}
	abstract void adduser(String name,String uname);
	abstract void search(String uname);
}
//class Txtuserservice extends Userservice{}
abstract class Xmluserservice extends Userservice{}

class DBuserservice extends Userservice{
	void adduser(String name,String uname){
		System.out.println("\n**Data added in db**");
		System.out.println("Name :"+name);
		System.out.println("UName :"+uname);
	}
	void search(String uname){
		System.out.println("\n**User searched from db**");
		System.out.println("UName :"+uname);
	}
}

